home *** CD-ROM | disk | FTP | other *** search
- on CheckRoll psButtonList
- set numlist to the number of items in psButtonList
- repeat with i = 1 to numlist
- set spritenum to value(item i of psButtonList)
- if rollOver(spritenum) then
- return spritenum
- exit
- end if
- end repeat
- return -1
- end
-
- on SwapRoll piSpriteNum, psSwapCast
- global gLast_Roll_Sprite
- if piSpriteNum > 0 then
- if gLast_Roll_Sprite <> piSpriteNum then
- RollReset()
- puppetSprite(piSpriteNum, 1)
- if integerp(psSwapSprite) then
- set NewCast to the number of cast psSwapCast
- end if
- set the castNum of sprite piSpriteNum to NewCast
- updateStage()
- set gLast_Roll_Sprite to piSpriteNum
- end if
- else
- RollReset()
- end if
- end
-
- on HiliteGraphic piSpriteNum, piHiLiClr, piHiLiSize
- global gLast_Roll_Sprite
- if piSpriteNum > 0 then
- if gLast_Roll_Sprite <> piSpriteNum then
- RollReset()
- if not (the puppet of sprite piSpriteNum) then
- puppetSprite(piSpriteNum, 1)
- end if
- if not voidp(piHiLiClr) then
- set the foreColor of sprite piSpriteNum to piHiLiClr
- end if
- if not voidp(piHiLiSize) then
- set the lineSize of sprite piSpriteNum to piHiLiSize
- end if
- updateStage()
- set gLast_Roll_Sprite to piSpriteNum
- end if
- else
- RollReset()
- end if
- end
-
- on RollReset
- global gLast_Roll_Sprite
- if gLast_Roll_Sprite > 0 then
- puppetSprite(gLast_Roll_Sprite, 0)
- set gLast_Roll_Sprite to EMPTY
- updateStage()
- end if
- end
-
- on FlashGraphic piSpriteNum, piHiLiClr, piHiLiSize
- global gFlashTime
- if voidp(gFlashTime) then
- set gFlashTime to 0.25
- end if
- RollReset()
- HiliteGraphic(piSpriteNum, piHiLiClr, piHiLiSize)
- WaitaSec(gFlashTime)
- RollReset()
- end
-